<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
  
  <PropertyGroup>
  	<projectSubDir>PerformanceCounterHelper</projectSubDir>
  	<publishSubDir>publish</publishSubDir>
  	<builderDirectories>PerformanceCounterHelper\Bin;PerformanceCounterHelper\Obj;PerformanceCounterHelper.Installer\Bin;PerformanceCounterHelper.Installer\Obj</builderDirectories>
  	<target>Release</target>
  </PropertyGroup>
  
  <ItemGroup>
    <DeployFiles Include="PerformanceCounterHelper\Bin\$(target)\**\*.*;PerformanceCounterHelper.Installer\Bin\$(target)\**\*.*" Exclude=""/>
  </ItemGroup>

  <Target Name="Clean">
    <RemoveDir Directories="$(builderDirectories)" />
  </Target>

  <Target Name="Build">
    <MSBuild Projects="$(projectSubDir).sln" Properties="Configuration=$(target)" />
  </Target>

  <Target Name="Publish">
    <MakeDir Condition="!Exists('$(publishSubDir)')" Directories="$(publishSubDir)"/>
    <Copy SourceFiles="@(DeployFiles)" DestinationFolder="$(publishSubDir)\%(RecursiveDir)" />
  </Target> 
</Project>